import { IAddTyoes, ILogin, IQuestionForm } from '@/utils/interface';
import { request } from 'umi';

// 获取试题列表
export function getQuestionType(){
  return request('/exam/getQuestionsType');
}
// // 获取登录数据
// export function login(data: ILogin){
//   return request('/user/login', {
//     method: 'POST',
//     data
//   });
// }

// // 获取用户信息接口
// export function getUserInfo(){
//   return request('/user/userInfo');
// }

// 获取所有课程
export function getExamSubject(){
  return request('/exam/subject');
}

// 获取所有考试类型
export function getExamType(){
  return request('/exam/examType');
}

// 添加试题
export function submitQuestion(data: IQuestionForm){
  return request('/exam/questions', {
    method: 'POST',
    data
  })
}

//添加试题类型
export function insertQuestions(value:IAddTyoes){
  return request('/exam/insertQuestionsType',{
    params:value
  })
}

export function examQuestions(){
  return request('/exam/questions/new')
}
